package com.imooc.miaosha.dao;

import com.imooc.miaosha.domain.MiaoshaUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface MiaoshaUserDao {

    @Select("SELECT * FROM miaosha_user WHERE id = #{id}")
    public MiaoshaUser getById(long id);

    @Update("UPDATE miaosha_user SET password=#{password} WHERE id=#{id}")
    void update(MiaoshaUser toBeUpdate);
}
